Credit Aplication Style.css

/* ===========================
   BORDE DEL MENU DE IDIOMA
=========================== */

/* Dropdown menu */
#lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 160px;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 15px 30px rgba(0,0,0,0.08);
  overflow: hidden;
  z-index: 1000;

  opacity: 0;
  transform: scale(0.95) translateY(-4px);
  pointer-events: none;
  transition: all 0.25s ease;
}

/* Visible state */
#lang-menu.show {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.hero-bg {
    position: relative;
    /* Mantenemos la imagen solo como respaldo (fallback) */
    background-image: url('../images/Fondo-Catalogo.jpg');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

/* Ajuste para que el video siempre cubra el área */
.hero-bg video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover; /* Esto hace que el video se comporte como background-size: cover */
}

/* ================================
   PAGE TRANSITION - FADE EFFECT
   ================================ */

html, body {
  width: 100%;
  height: 100%;
}

body {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Se aplica solo cuando JS agrega la clase */
body.fade-out {
  opacity: 0;
}

header {
    /* Esto crea un 'recorte' para que el video fijo solo se vea aquí */
    clip-path: inset(0 0 0 0);
}

/* Asegura que la sección que sigue al header tenga un fondo para tapar el video al subir */
section, main {
    position: relative;
    z-index: 100; /* Solo el número entero */
    background-color: #f9fafb;
}

html {
  scroll-behavior: smooth;
}

/* Opcional: añade un margen para que la sección no quede pegada al borde superior 
   (útil si tienes un menú fijo arriba) */
#credit_form {
  scroll-margin-top: 100px;
}

/*=====================================
         Error borde rrojo
=====================================*/

/* Clase para campos con error */
.field-error {
    border-color: #ef4444 !important; /* Rojo intenso */
    background-color: #fef2f2 !important; /* Fondo rojizo suave */
    animation: shake 0.4s ease-in-out;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2); /* Resplandor rojo */
}

/* Animación de vibración */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Transición suave para cuando se quita el error */
input, select, textarea {
    transition: all 0.3s ease-in-out;
}

/* ===========================
   TABLET Y DESKTOP
   min-width: 768px
   =========================== */
@media (min-width: 768px) {
  /* Hero: Desktop visible */
  .hero-desktop {
    display: block;
  }

  .hero-mobile {
    display: none;
  }

  /* Offers: Desktop visible */
  .offers-desktop {
    display: block;
  }

  .offers-mobile {
    display: none;
  }

  /* 1. LA IMAGEN: Centrada verticalmente */
  .capa-trasera {
      z-index: 10 !important;
      opacity: 0.6;
      top: 50% !important; /* La bajamos al medio */
      transform: translateY(-50%) scale(0.95) translateX(-20px) !important; /* La centramos y movemos a la izquierda */
  }

  /* 2. EL FORMULARIO (Card Azul): Lo centramos verticalmente también */
  .capa-frontal {
      z-index: 50 !important;
      top: 50% !important; /* Lo bajamos al medio */
      right: 0 !important; /* Lo pegamos a la derecha */
      transform: translateY(-50%) scale(1.02) !important; /* Lo centramos verticalmente */
  }

  /* 3. EFECTO HOVER: Para que no se muevan al poner el mouse */
  #img-capa:hover {
      transform: translateY(-50%) scale(1.05) translateX(0px) !important;
      z-index: 60 !important;
      opacity: 1 !important;
  }
  
  #card-azul:hover {
      transform: translateY(-50%) scale(1.05) !important;
      z-index: 60 !important;
  }
}

    /* Solo aplicamos la lógica de capas en pantallas medianas o superiores */
    @media (min-width: 768px) {
        .capa-frontal {
            z-index: 50 !important;
            transform: scale(1.02);
        }
        .capa-trasera {
            z-index: 10 !important;
            opacity: 0.6;
            transform: scale(0.95) translateX(-20px);
        }
    }
    
    /* En móvil reseteamos transformaciones para que no se vea raro */
    @media (max-width: 767px) {
        .capa-frontal, .capa-trasera {
            transform: none !important;
            opacity: 1 !important;
        }
    }


